class Hero:
    hero_hp = 0
    hero_power = 0
    hero_name = ""
    def fight(self, enemy_hp, enemy_power, enemy_name):
        """
        :param enemy_hp: 敌人的血量，是整型
        :param enemy_power: 敌人的血量，是整型
        :return:
        """
        # 计算英雄最终的血量, 通过self.类变量 去调用 类中的类变量
        hero_final_hp = self.hero_hp - enemy_power
        # 计算敌人的最终血量
        enemy_final_hp = enemy_hp - self.hero_power
        # 判断最终谁的血量更多
        if hero_final_hp>enemy_final_hp:
            print(f"{self.hero_name}赢了")
        elif enemy_final_hp>hero_final_hp:
            print(f"{enemy_name}赢了")
        else:
            print("平局")

class Jinx(Hero):
    hero_hp = 1200
    hero_power = 210
    hero_name = "Jinx"
    # def __init__(self):

class EZ(Hero):
    hero_hp = 1100
    hero_power = 190
    hero_name = "EZ"

class Timo(Hero):
    hero_hp = 1100
    hero_power = 190
    hero_name = "timo"

if __name__ == '__main__':

    jinx = Jinx()
    ez = EZ()
    # jinx.fight(ez.hero_hp, ez.hero_power)
    ez.fight(jinx.hero_hp, jinx.hero_power, "Jinx")
